﻿using System.Collections.Generic;
using Orchard;
using So.ImageResizer.Models;
using Resizer = ImageResizer;
using So.ImageResizer.Helpers;

namespace So.ImageResizer.Services {
    public interface IImageResizerService : IDependency {
        string CreateMd5Hash(string input);
        string GetCleanFileExtension(string url);
        string GetMimeTypeByImageExtesion(string fileExtention);
        IEnumerable<string> SupportedFileExtensions();

        string ResizeImage(string url, int width = 0, int height = 0, int maxWidth = 0, int maxheight = 0, Resizer.CropMode cropMode = Resizer.CropMode.Auto,
                           Resizer.ScaleMode scale = Resizer.ScaleMode.Both, Resizer.StretchMode stretchMode = Resizer.StretchMode.Proportionally);

        string BuildResizeImageUrl(string url, int width, int height, int maxWidth, int maxHeight, ResizeSettingType.CropMode crop = ResizeSettingType.CropMode.None,
                                   ResizeSettingType.ScaleMode scale = ResizeSettingType.ScaleMode.Both, ResizeSettingType.StretchMode stretch = ResizeSettingType.StretchMode.Proportionally);

        string UpdateAllImageSourcesToResizedUrlsFromHtml(string html);
        ResizerSettingsModel GetImageResizerSettings();
    }
}